package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysSubcategoryMapper;
import com.ruoyi.system.domain.SysSubcategory;
import com.ruoyi.system.service.ISysSubcategoryService;

/**
 * 子类别Service业务层处理
 * 
 * @author toufu
 * @date 2021-03-28
 */
@Service
public class SysSubcategoryServiceImpl implements ISysSubcategoryService 
{
    @Autowired
    private SysSubcategoryMapper sysSubcategoryMapper;

    /**
     * 查询子类别
     * 
     * @param subcategoryId 子类别ID
     * @return 子类别
     */
    @Override
    public SysSubcategory selectSysSubcategoryById(Long subcategoryId)
    {
        return sysSubcategoryMapper.selectSysSubcategoryById(subcategoryId);
    }

    /**
     * 查询子类别列表
     * 
     * @param sysSubcategory 子类别
     * @return 子类别
     */
    @Override
    public List<SysSubcategory> selectSysSubcategoryList(SysSubcategory sysSubcategory)
    {
        return sysSubcategoryMapper.selectSysSubcategoryList(sysSubcategory);
    }

    /**
     * 新增子类别
     * 
     * @param sysSubcategory 子类别
     * @return 结果
     */
    @Override
    public int insertSysSubcategory(SysSubcategory sysSubcategory)
    {
        return sysSubcategoryMapper.insertSysSubcategory(sysSubcategory);
    }

    /**
     * 修改子类别
     * 
     * @param sysSubcategory 子类别
     * @return 结果
     */
    @Override
    public int updateSysSubcategory(SysSubcategory sysSubcategory)
    {
        return sysSubcategoryMapper.updateSysSubcategory(sysSubcategory);
    }

    /**
     * 批量删除子类别
     * 
     * @param subcategoryIds 需要删除的子类别ID
     * @return 结果
     */
    @Override
    public int deleteSysSubcategoryByIds(Long[] subcategoryIds)
    {
        return sysSubcategoryMapper.deleteSysSubcategoryByIds(subcategoryIds);
    }

    /**
     * 删除子类别信息
     * 
     * @param subcategoryId 子类别ID
     * @return 结果
     */
    @Override
    public int deleteSysSubcategoryById(Long subcategoryId)
    {
        return sysSubcategoryMapper.deleteSysSubcategoryById(subcategoryId);
    }
}
